
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglSxh.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglSxhForm"
 */
public class XtglSxhForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _sxbh = null;
   private java.lang.String _nd = null;
   private java.lang.String _dwbh = null;
   private java.lang.String _sxlxDm = null;
   private java.lang.String _fzlxDm = null;
   private java.lang.String _sxh = null;
   private java.lang.String _zt1 = null;
   private java.lang.String _zt2 = null;
   private java.lang.String _zt3 = null;
   private java.lang.String _zt4 = null;
   private java.lang.String _zt5 = null;
   private java.lang.String _zt6 = null;

   /**
    * Standard constructor.
    */
   public XtglSxhForm() {
   }

   /**
    * Returns the sxbh
    *
    * @return the sxbh
    */
   public java.lang.String getSxbh() {
      return _sxbh;
   }

   /**
    * Sets the sxbh
    *
    * @param sxbh the new sxbh value
    */
   public void setSxbh(java.lang.String sxbh) {
      _sxbh = sxbh;
   }
   /**
    * Returns the nd
    *
    * @return the nd
    */
   public java.lang.String getNd() {
      return _nd;
   }

   /**
    * Sets the nd
    *
    * @param nd the new nd value
    */
   public void setNd(java.lang.String nd) {
      _nd = nd;
   }
   /**
    * Returns the dwbh
    *
    * @return the dwbh
    */
   public java.lang.String getDwbh() {
      return _dwbh;
   }

   /**
    * Sets the dwbh
    *
    * @param dwbh the new dwbh value
    */
   public void setDwbh(java.lang.String dwbh) {
      _dwbh = dwbh;
   }
   /**
    * Returns the sxlxDm
    *
    * @return the sxlxDm
    */
   public java.lang.String getSxlxDm() {
      return _sxlxDm;
   }

   /**
    * Sets the sxlxDm
    *
    * @param sxlxDm the new sxlxDm value
    */
   public void setSxlxDm(java.lang.String sxlxDm) {
      _sxlxDm = sxlxDm;
   }
   /**
    * Returns the fzlxDm
    *
    * @return the fzlxDm
    */
   public java.lang.String getFzlxDm() {
      return _fzlxDm;
   }

   /**
    * Sets the fzlxDm
    *
    * @param fzlxDm the new fzlxDm value
    */
   public void setFzlxDm(java.lang.String fzlxDm) {
      _fzlxDm = fzlxDm;
   }
   /**
    * Returns the sxh
    *
    * @return the sxh
    */
   public java.lang.String getSxh() {
      return _sxh;
   }

   /**
    * Sets the sxh
    *
    * @param sxh the new sxh value
    */
   public void setSxh(java.lang.String sxh) {
      _sxh = sxh;
   }
   /**
    * Returns the zt1
    *
    * @return the zt1
    */
   public java.lang.String getZt1() {
      return _zt1;
   }

   /**
    * Sets the zt1
    *
    * @param zt1 the new zt1 value
    */
   public void setZt1(java.lang.String zt1) {
      _zt1 = zt1;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }
   /**
    * Returns the zt3
    *
    * @return the zt3
    */
   public java.lang.String getZt3() {
      return _zt3;
   }

   /**
    * Sets the zt3
    *
    * @param zt3 the new zt3 value
    */
   public void setZt3(java.lang.String zt3) {
      _zt3 = zt3;
   }
   /**
    * Returns the zt4
    *
    * @return the zt4
    */
   public java.lang.String getZt4() {
      return _zt4;
   }

   /**
    * Sets the zt4
    *
    * @param zt4 the new zt4 value
    */
   public void setZt4(java.lang.String zt4) {
      _zt4 = zt4;
   }
   /**
    * Returns the zt5
    *
    * @return the zt5
    */
   public java.lang.String getZt5() {
      return _zt5;
   }

   /**
    * Sets the zt5
    *
    * @param zt5 the new zt5 value
    */
   public void setZt5(java.lang.String zt5) {
      _zt5 = zt5;
   }
   /**
    * Returns the zt6
    *
    * @return the zt6
    */
   public java.lang.String getZt6() {
      return _zt6;
   }

   /**
    * Sets the zt6
    *
    * @param zt6 the new zt6 value
    */
   public void setZt6(java.lang.String zt6) {
      _zt6 = zt6;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getSxbh() == null) {
         errors.add("sxbh", new ActionError("error.sxbh.required"));
      }
      if(getSxlxDm() == null) {
         errors.add("sxlxDm", new ActionError("error.sxlxDm.required"));
      }
      if(getSxh() == null) {
         errors.add("sxh", new ActionError("error.sxh.required"));
      }
      // TODO test format/data
      return errors;
   }
}
